package com.homework.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.homework.entity.Post;
import com.baomidou.mybatisplus.extension.service.IService;
import com.homework.search.dto.PostDTO;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lv-success
 * @since 2018-10-14
 */
public interface PostService extends BaseService<Post> {

    public void incrZsetValueAndUnionForLastWeekRank(Long postId);

    public void zUnionAndStoreLast7DaysForLastWeekRank();

    public void initIndexWeekRank();

    PostDTO findPostDTOById(long postId);

    void setViewCount(Map<String, Object> post);

    IPage<PostDTO> findPostDTOByPage(Page<PostDTO> page, String keyword);
}
